package com.wujiansima.renyisima.demo.demo3;

import com.wujiansima.renyisima.demo.demo2.MyCallable;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class Test3 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        MyCallable3 mc3  =new MyCallable3();
        FutureTask<String> ft = new FutureTask<>(mc3);
        Thread tr = new Thread(ft);
        tr.start();
        String s = ft.get();
        System.out.println(s);
    }
}
